﻿using System;
using System.Collections.Generic;
using System.IO;

namespace Compiler.CompilerLogic
{
    [Serializable]
    public class CompiledProgram
    {
        public LexicalTables LexicalTables;
        public SyntaxNode SyntaxTreeRoot;
        public CodeGen CodeGen;
        public List<string> Errors; 

        public CompiledProgram(FileStream stream)
        {
            LexicalTables = new LexicalTables(stream);
            Errors = LexicalTables.Errors;
            SyntaxTreeRoot = SyntaxTree.GetRoot();
            CodeGen = new CodeGen(LexicalTables);
        }
    }
}